this callback should really be a function vs inline. It's a lot of LoC that's hard to read/process due to the inlining.