update request handling, add more tests