a few changes in the code.