removed unused code & variables (nw)