Tweaking diary function