implemented full example for fetching posts