channel select instead of two loops