function scopes are defined much earlier and don't contain 'response' variable