replaces ?: with if-else cascade

Thanks @parkr for readability-checking this!

[#76]