Factory method.