Move supervision to a different function.