code samples updated