some changes in the code