added support for embedded resources