fixed the leak (in a nasty way)
added a in memory version only