changed memory -> db