added test case for response status code and fixed implementation