move math before brute