add export button and clean up