added code functionality in posts