added in lecture7 exercise