slight performance improvements to model class