moved more code into channel ns