added bubbling feature which calls a function on itself and all ancestor ones