add function inOrout, and modified possibleKey