corrected a lot of early mistakes