moved some globals