just decided how to dynamically know which index i'm on when converting the segment