refactor more redundant code into is_deny_response