updated for assignment 2