avoiding globals