preliminary texture code