refactor slightly (nw)