made several code samples more consistent