changed list to map