Need to fix the outstanding bug in the program (undefined identifier)