cleanup
add c api index_to_pos
add c api pos_to_index
add c api cross_product