modify sp to strip spaces also