add off line download function