why dont you just make a method for each job and then call the methods from the main method? like


main method here {
method1();
method2();
method3();
}
method1() {
some code