Better ZWS implementation