implemented diagonal mirroring and rotation