updates to stackem.c