server_command function seperated