refactored existing code using asio, ready to start actual simulation code