improvements to model.set() and .get()