sp: implementation