read through and fixed small errors