Replaced and with or and used the smaller but qualified function names. There's probably something more reasonable than "brute_force" but I couldn't think of one.