change rootpath to loadpath