modifying the file to reduce errors in code