created LongtoChar method