Added onCommand Method