change numbers in printing routine to match 0-based indices