main.cpp now initializes the master