add function of linking to post