sd code samples