optimized mapping domain function