created ServerRequest and adjusted code to work properly