Adjusted Some code