a little bit refactoring, splitting methods for download and update