bugfixing and add first part of demo 1