mild code reformatting for clarity