delete sp functions