add support for interfaces - fix the bug