more generic way of doing shape nuisance templates