separate handler from the server