added alternative SP detection