bugfixes, more code, etc