use string::npos instead of -1