trim response, and test