changed the downloading portion to MainActivity