refactoring code for startServer status