speed up Problem 263