added function for related posts