Updated the example + bug fixing