more bugfixes, code runs