moved the comparison to the execute function