in process of upgrading to sqlalchemy