Homework N 4

Passed all asserts.