Rewrote to add download button