starting code for texture managment system