first iteration of trend mining