adjusted code samples