cleaned up setting channel setup code