change the interface of map, we can know if error has occur