changed memory calculation