removed commented out include
replaced $num_masters with a ruby script