callback as attribute in class.