updated controller with var numarray