convert more practice over to SQLAlchemy