solve by Brute Force, not elegant