add self_pipe class