use pipe function