Refactored with pipe operator.