refactored public to local