introduced robot, did some refactorings