binds events in a method