Completed ex48

All unit tests work!