Add fn to KDMap