re-organizing the ros node into a class