updated for assignment 4