updated some lines of code