getting value for topic to sort by date and votes