initialized last as -1 (0 has meaning)