db changed to db_array for charts