make implementation the same for params and local vars