square test refactor complete