use immutable instead of core-map