first commit
fix crashes by avoiding referring to positions[100], just 0-99