added support for adding handlers