added a function to retrieve posts with postID