update source code of tutorial to coding conventions