incorporate Jeff's comments for inlining patch