add previous version and new templates make database and add history_search