use case instead of lots of ifs, I reckon.