refactor to expose channel to caller