add conditions to table