sqashed some bugs in the example