moved methods out of server.utils