initial port of tutorial