memory
memory refactor