much more functions etc in memory class