Added diary api
fixed merge conflicts