fixed serial calls in main.cpp to support new Serial method