added array index to controller initializer