removed uncecessary global