converting Hash structure to Array