added search and character frequency