some tutorial codes