use mutable function argument syntax in treemap