fixed comments and formatting. set up to refactor using squares