added callback to remove function