refactoring product and storage array