refactoring with prototypes, creating a product class