substring finding for q3