simulation test and bugfixes