small changes in some of the codes