add support for adding generic handlers

fixes #1549