move callback out