added additional conditions