remodulerized the code and just need to add the math for orientation and movement