Refactor filterresponse so we can use it to return response information