Adding s2-index to curves function