corrected style of code