some refactoring to stdr_robot