forget to change -1 to 0