Replaced extend class with observer