replace some strstr() to strpos()