simplify node and use memento as base code