Added a function to parse the requests