basic tutorial code finished