Added part4. Also fixed a syntactic mistake in part3.