bugfixes
added comments