make index constexpr