Modified model class so that it might work