Main function added and input file edited