fixes issue 1 - csv export file is empty, code comments updated too