model functions updated