upgraded models, fixed api