New code introduced to main.cpp