refactor and texture selection