update functions, still a work in progress