added csv import and error handling