size_t felt more correct than ptrdiff_t
fixed indentation, fixed demo
more indentation fixing
don't check in demo app