implemented animated texture.  refactored structure of texture