recover main function in update.db && update charts template(test)