removed all relations to global variables