improve id capture