add recompute method