DiaryEntry function added  and related changes in other classes