Using Array instead of Map