Modified and added main file by adding method definition