introduce usage of channels
refactor fixed