add suport for both str and unicode