Implement homework 3.1
Implement homework 3.2
Implement homework 3.3.