possibly corrected some errors