add stack, analysis, sorts