moved server init to main