Added minor chnages given to be by John