use map type to fix duplication