reworked out io. now patterns are returned by stream block not channel. also cleaned up clock