Included callback functionality in loop