refactoring&request code check&class presence check