Better to use setFactory here methinks