modified tutorial