update : make first tutorial code easier, removed duplicated code.

Signed-off-by: Kim <Kulling>