refactor internal network check into decorator