changed strstr to strpos for optimization purposes.