add unit test
fix bug of bytes and string confusion