added donwloder logic