added unloop callback functionality