REG/WS implemented. some condition tested.