issue #3939: Refactor all createWithXXX function into one unified create function with different parameters