ok, need cleverer updatefunc