added support for methods