add stack awareness