functioning code that can take different sized steps depending on acceleration strength