added support for animated sprite