No need of multiple threads for three different problems at the same time, just one will do.