added db read/write to new framework