added export logic