changed hash to map