finished updatemean()