updated structure and got sqlalchemy working