final version assignment 4