code samples from classes