added close callback