updated exercise3