updated the stack decoder with documentation