initial tests, bugfixes