solution to problem one