using sqlalchemy from flask instead - incomplete