finished basic export functionality