some prototyping
bugfixes