transsferred programFlow to slave.cc in comments