removed several file-scoped variables