this is a working custom code for servicetraining