checked the conditions in