more logic to nim server, didn't finish the command handling yet