added switch code
added array example