need wget
refactoring to put device-dependent stuff at the end