refactor fix private attribute warning

refactor fix private attribute warning