move download class to seperate file