adding model functions