It seems to me it would be more efficient to just test for the existence of `fn` to keep the buffer smaller.