updated for final assignment 8