removed extra globals