optimize the class scope