added continuous-read callback function to exec method