Diamond example code