revised condition + fixed typo