Added a done function to the example