Reduced the search space to increase the speed of computation