Co-authored-by: Tim Graham <timograham@gmail.com>
Thanks Mariusz Felisiak and Tim Graham for reviews.