finally using the model class i wrote