routes to handle server response