fix up code formatting based on Gabe's suggestions