make getNum() in Main class