model: pull computation out of conditional