modify some algorithms

Sune, Anti-Sune, Aa, Ab