added post snippet functionality