adding supervisor code