Refactored network calls functions with Enum