rewrote stuff...