rewrote db setup with sqlalchemy