DRY squarish logic