tested with strings  and chars