implementation of class method