Changed main.cpp to have two tasks running