refactored trending to json