added factory option to patch