work on server_main