Intelligent resource management for 5G