removed some casting (nw)