convert conditionals to objects