change params to use pipe

also include param binding for function references