refactor trends view