works on rotating triangle example