added p2p download function

Signed-off-by: Hongyi Jia <Hongyi.Jia.GR@dartmouth.edu>