use class method to slove this issue