working on preloading memory