Add setInstancecallback