changed update fcn to void from double