working! can't believe i had the backward case iterating forward...