changed _ to be ? for invalid chars