closes #10 and makes json downloadable