clean up, bugfixing