Finished formula for movement