extract calculations into model class