functions moved between strava.process.R and trimp.R