tweaked code samples