brute-force
optimize with dicts