refactored singbytxor to take key array as arg