solved IfElse exercise on 9/22/14