Add update function in db_layer, now all work