slight changes in formatting in the previous code