add compareelement and computeAIM
debug algorithms.cpp