refactored hybrid server and improved test coverage