updated method and class