modified code to show the newest post first