added callbacks fixed numpy api examples