refactored specs for request and made changes to variable name