removed example and replaced with own code