working pipes code