remove the incorrect array indexing