homework-4 (third commit)

Not fully working version.