Added solution to Problem 1