working on downloading mechanism