refactor server_export