Lab3 working solution.