add behavior for when a method is added