hw7 except for asserts and exceptions