refactored search template to use dictionary object