added channel detection