-1 as key looks wrong... it should start with 0 of course.