Uploading solution to Problem 1