added go-wait fn, reworked selectors and timeouts