changed the +1 to index back to -1