some changes while going through the code