Revise to use bytes to implement the gfunction.