made testing much more powerful with "make test" and #define DEBUG