renamed value to str in sanitize()