exporting as.data.frame as well