Added solution to exercise