added callback to stop method