moved dbWrapper to a separate module