Combined Lab6 solutions.