move key checking to rets.erl. broke everything.