Moved server to own method