finished re-factor with channel seperation