modified addCallback method