moved brute force calc to own function