this version can compile without the db engine in it
complete later