fixes #2: add a new option `server_mode`