compiled now but untested, realized stack->size was inaccessible