several bugfixes and furter development of the test cases