updated to complete assignment 2 of course