some typos corrected in chacematrix.R file