updated exercise lecture 2