checking response text and code