Homework 2

It works, will improve it more later.