added download and intent code