lab3 now works with minor bugs.