Added check for all and check for any