getting rid of global contexts