changed function to work from R working directory