inlined primitive functions