modified create_server method