completion of assignment 2