add a sample for spec.
fix and add some comments