added array check