define method in product controller