Generalise stpm2 for different link families