make refactored functions static scope