switch (state.pipesCount) {
    case 0:
      state.pipes = dest;
      break;
    case 1: