added #doDone and #doFail methods