better encapsulation. attempt at chan
attempt at chan's