Updating velocity and adding acceleration