extracting method for cross-product
fixing check style issues