misc changes, rewrote new