better support for mapping with different layers