migrated functionality from narrative to demonstrator branch