Finished assignment 3.1.*