reformatted the code