added trends support from database