change attribute class to class due to syntax error, update method