partially moved code into ROS package