refactor the code of MarRovers