why is err not declared and used in line