code samples improved