a revised version of tutorial 3 for practice