added reverse iterator version