changed solution to problem1 to use the 'some' function