adjusting functions to make SmartSearch sharable between map and table