Added trends and entities function