more robust sp name extraction