Inlined helper functions