My code for SLP