calling update function