move name outside of inner function