changed index in index_2p_t to unsigned int