remove global variables and use super global variables