unify target generating method