Added Update function.