refactoring lobby and testing lobby