cost and product views refactoring