CHANGED some lines of code