Added user input functionality to main.cpp