added callback to finctions