added rest of assignment 2