last pos less than or equal to the target