Added 'done' function.