gras: moved all done logic end of task main