finish robot refactor