square class enhanced