improve index buffer api