breaks apart logic and completes all move functions