subtract 1 from index