test extended and some bugfixing