 code assumes zero/non-zero; fix if more flags are added
 need some work on ensuring the call stack is correct
 need some work on ensuring the call stack is correct
 temp functions?  wait and see
