Really completed textbook assignment 3