brute force solution attempt