fix model(detach from database.py)