some code changes in formatting