added function to view posts !! using join table !!