multiple if to case statement