refactoring for io_service almost finished, need sensor to test and need to add comments