common model functions