add function to export users as csv