added option to use external textures