functions for primary decomposition (pre-loaded)