refactor publicVariable