changing autonomous code for moving distances
refactoring code and removed unused things
revised autonomous code