added bitwise conditions for keys in decorator