partially make it work in memory