Refactor channel to seperate variable