add index to hashcode