inlined factory