updating with top method and removing inmemory db