tutorial improved a bit