a rather unpleasant brute force search. still, it runs in under 1 sec