added function to handle CSV