bugfixes
first version that compiles