revise memory implementations