Modified examples to work with new callback signature