added methods to set and remove callback