removed map class and used an associative array