refactor, add test for product list