This is nitpicking, but you set index two times here.