implemented most of basic memory features