Making use of PortableFactory instead of PortableHook