Brute force search implemented. slow