switch dict to array for tags