updated codes from assignment 7