added functionality to display recent posts