changed bytes array to byte comparison directly