added id function to CAPI