extracted square class