new tests and bugfixes according to them