write lookfor function