     applyGravity: (particle) ->
       delta = particle.position.subtract @position
       if delta.magnitude() > @mass + particle.mass
-        gForce = @GRAVITATIONAL_CONSTANT * particle.mass / delta.squareMagnitude()
+        gForce = @GRAVITATIONAL_CONSTANT * particle.mass * @mass / delta.squareMagnitude()
         @applyForce new Vector
           x: gForce * Math.cos(delta.angle())
           y: gForce * Math.sin(delta.angle())
 
     applyForce: (force) ->
-      @force = @force.add force
+      @acceleration = force.multiply(1/@mass).add(@acceleration)
 
     render: (context, scale) ->
       context.fillStyle = '#FFFFFF'

    lastUpdateTime: 0

    constructor: (@mass, @position, @velocity) ->
      Particle.particles.push @

    update: (time) ->

      @lastUpdateTime = time

      return null if deltaTime == 0
      @calculateGravity()

      @velocity = @acceleration.multiply(deltaTime).add(@velocity)
      @position = @velocity.multiply(deltaTime).add(@position)
      @acceleration = new Vector(0, 0)

    calculateGravity: ->
      for particle in Particle.particles
