added support for animated backgrounds