First try at complete assignment 1