rewrote tests, improved stuff