bug fix in findChar and add more functions