it compiles at least...
things...
it works...
not very polished, tough...
better
buffer unwinding fixed
typo