added array version functions