refactoring textures