add update method
split compute into compute_all and compute_output