added export functionality