extract code samples