get rid of a couple of bad if/else