added done function to tests