simplified the algorithm by making 10 a special case