changed runMainLoop method name to start