added an onSuccess functionality to vtrainer