reworked search; minor corrections