refactored wget