added functions chviewers and entries in main