added self to event functions