move extractId to utils