implemented squared structure of ring