added lots of globals