defined api of pipe