fixed use of model/db, which is deprecated