code reading, bugfixes