Implement a new addHandler funciton