fixed issue with request.body. Needs refactoring