changed formating to make code easier to read