simplified code w/ multi-way if'
'