editing for code clarity