simplified code (removed extra event for each command -> commands will now be interpreted on the server)