refactored to model class
extract to model class