moved needcred to native