implementing DB back end