several improvement to basic tutorial