The SPSM Algorithm