sort the posts; TODO: we need a better way to sort