used wrong var name in sub