code refactor for product spider