added globals
added observers to handle global events