added merge() and dbfile functionality