added additional values to condition for valid ids