finalized assignment 1b