Revert "fix test to bytes"

This reverts commit 13e189c0e06d3b770b3d8b5216351ffe3628c991.
Revert "new api func"

This reverts commit 1e93a60158472ad8d8c46c79eeb6942fa4c60045.