added preliminary search function