added r6 return to end of dosearch