removed unneeded globals