work-in-progress on reading/writing model from/into db