added paging to thread detail page