extract id parsing to util functions in core