improving chainmapping