adds skeleton; some bugfixes