Added solution to q 3