add search record function