edited simple_server to identify request type