fixed problems mentioned in the review.