switching from cond to case