now checking conditions