add compute dest id function