divide model and use sqlalchemy