search changed to return useful dictionary