added global variables as class parameters