removed unused argument from inner function