yes, I copied the initial code from elsewhere