changed arraylists to arrays to shorten time and changed doubles to longs to handle the large number, though it still won't handle the number in question.