another example and little fix in class method