adding first example and bugfixes