refact callback done