Class solution