add support for methods used as callbacks