added support for internal blocks