formatted the code