kind of intelligent guessing
good enough
slow but working