Model callbacks sample code