add update function by JackeyFoo@20130408-16:19