removing index check