reuse err so that we avoid the 'no new variables on left side of := ' error