adapted conversion script