better variable scope