Id parsing script