added switch. Kinds like the ruby case statement