refactor products class