beeman and verlet implementation