added commented pseudocode and fixed data file