added callback to listen function