clean code; solve channel update problem