change index to start at 0