update db && update some function