Make identity map more generic