I suspect there is some error in the decision logic here. perhaps left is checked first? Something ought to be done about it...